package com.designpatterns.singleton.hungry;

/**
 * @author Tinu 1810989@qq.com
 */
//饿汉式单例   静态块实现
public class HungryStaticSingleton {

    private static final HungryStaticSingleton hungryStaticSingleton;

    private HungryStaticSingleton(){}

    static {
        hungryStaticSingleton = new HungryStaticSingleton();
    }

    public static HungryStaticSingleton getInstance() {
        return hungryStaticSingleton;
    }
}
